<template>
  <div class="content">
    <div v-html="content"></div>
  </div>
</template>

<script>
export default {
  name: 'editor-detail',
  data () {
    return {}
  },
  props: {
    content: {
      type: String,
      default: ''
    }
  },
  mounted () {}
}
</script>

<style lang="css">
.content {
  margin-bottom: 20px;
}
.content ::v-deep p {
  margin-bottom: 20px;
  word-break: break-all;
}
/* table 样式 */
.content ::v-deep table {
  border-top: 1px solid #ccc;
  border-left: 1px solid #ccc;
}

.content ::v-deep table td,
.content ::v-deep table th {
  border-bottom: 1px solid #ccc;
  border-right: 1px solid #ccc;
  padding: 3px 5px;
}
.content ::v-deep table th {
  border-bottom: 2px solid #ccc;
  text-align: center;
}

/* blockquote 样式 */
.content ::v-deep blockquote {
  padding: 20px;
  background-color: #fafafa;
  border-left: 6px solid #e6e6e6;
  word-break: break-word;
  font-size: 16px;
  font-weight: normal;
  line-height: 30px;
  margin: 0 0 20px;
}

/* code 样式 */
.content ::v-deep code {
  display: inline-block;
  *display: inline;
  *zoom: 1;
  background-color: #fafafa;
  border-radius: 3px;
  padding: 3px 15px;
  margin: 0 3px;
  max-height: 200px;
  overflow-y: auto;
}
.content ::v-deep pre code {
  display: block;
}

/* ul ol 样式 */
.content ::v-deep ul,
ol {
  margin: 10px 0 10px 20px;
}
</style>
